#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
/********found********/
double fun(int n) {
    int a = 2, b = 1, c;
    double s = 0.0;
    for (int i = 0; i < n; i++) {



        /********found********/
        s = s + (double)a / b;
        c = a;
        a = a + b;
        b = c;
    }
    return s;
}
void main() {
    int n;
    scanf("%d", &n);
    printf("%lf\n", fun(n));
}
